<!doctype html>
<html lang="zh-CN" xmlns:width="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>风飘絮论坛</title>

    <!-- Bootstrap -->
    <!-- 头部图片 -->
    <link rel="icon" type="image/x-icon" href="./img/willow.png"/>
    <link rel="stylesheet" href="./css/bootstrap.min.css" crossorigin="anonymous">

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>

    <![endif]-->
    <script src="./js/v2.6.10/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <!--    <script src="./js/vue-router.js" type="text/javascript" charset="UTF-8"></script>-->

    <!-- <script src="./js/vue.js" type="text/javascript" charset="utf-8"></script> -->
</head>
<body>
<div>

    <div class="container-fluid">
        <div id="app">
            <div class="row" style="background-color: #d0d0d0;" id="app2">
                <div class="col-md-10"><h2>风飘絮</h2></div>
                <div id="hed1" v-show="!hed1type" class="col-md-1" style="padding: 1%;">

                    <span class="glyphicon glyphicon-user" aria-hidden="true"></span>&nbsp;&nbsp;<span
                        style="cursor: pointer;" onclick="javascrtpt:window.location.href='door.html'">登录</span>
                    &nbsp;&nbsp;<span style="cursor: pointer;" data-toggle="modal" data-target="#xampleModal"
                                      data-whatever="@mdoo">注册</span>
                </div>
                <div id="hed2" v-show="hed1type" class="col-md-1" style="padding: 1%;">
                    <div style="width: 50px; height: 50px; border-radius:25px;"
                         v-bind:style="{backgroundImage: 'url(' + hedimg + ')'}">
                    </div>
                    <span>{{hedname}}</span>
                    <button @click="exit()">退出登录</button>
                </div>
                <div class="col-md-1">
                </div>
            </div>
            <div class="row" id="caidan">
                <div class="col-md-12">
                    <nav class="navbar navbar-default">
                        <div class="container-fluid">
                            <!-- Brand and toggle get grouped for better mobile display -->
                            <div class="navbar-header">
                                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                                        data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                                    <span class="sr-only">显示</span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                </button>
                                <a id="b2" @click="to(),look=2" href="#" class="navbar-brand">通知</a>

                                <!-- 网站通知 -->
                            </div>

                            <!-- Collect the nav links, forms, and other content for toggling -->
                            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                                <ul class="nav navbar-nav">
                                    <li class="active" data-toggle="modal" data-target="#postin"
                                        data-whatever="@mdop" v-show="hed1type"><a style="cursor: pointer;">发帖</a> <span
                                            class="sr-only">(current)</span></li>
                                    <li>
                                        <a id="b1" class="navbar-brand" href="#" @click="to(),look=1">首页</a>
                                    </li>
                                    <li class="dropdown">
                                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                                           aria-haspopup="true" aria-expanded="false">我的标签<span
                                                class="caret"></span></a>
                                        <ul class="dropdown-menu">
                                            <li><a href="#">dfd</a></li>
                                            <li><a href="#">Another</a></li>
                                            <li><a href="#">Somethin</a></li>
                                            <li role="separator" class="divider"></li>
                                            <li data-toggle="modal" data-target="#updateModal"><a href="#">修改标签</a>
                                            </li>

                                        </ul>
                                    </li>
                                </ul>
                                <form autocomplete="off" @submit.prevent="seekSubmit" class="navbar-form navbar-left" id="seek">
                                    <div class="form-group">
                                        <input type="text"  v-model="seek" id="seekp" class="form-control" name="seekp" placeholder="你喜欢什么?">
                                        <!--                                    <input type="text" class="form-control" name="two2" placeholder="不够？">-->
                                        <!--                                    <input type="text" class="form-control" name="three" placeholder="还不够？">-->
                                        <!--                                    <input type="text" class="form-control" name="four" placeholder="全都要？">-->
                                    </div>
                                    <button type="submit" class="btn btn-default">搜索</button>
                                </form>
                                <ul class="nav navbar-nav navbar-right">
                                    <li>
                                        <a id="b3" class="navbar-brand" style="cursor: pointer;" @click="to(),look=3">个人空间</a>
                                    </li>
                                    <li class="dropdown">
                                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                                           aria-haspopup="true" aria-expanded="false">我的关注 <span
                                                class="caret"></span></a>
                                        <ul class="dropdown-menu">
                                            <li><a href="#">Action</a></li>
                                            <li><a href="#">Another action</a></li>
                                        </ul>
                                    </li>
                                </ul>
                            </div><!-- /.navbar-collapse -->
                        </div><!-- /.container-fluid -->
                    </nav>
                </div>

            </div>
            <!-- 模态框注册 -->
            <div class="modal fade" id="xampleModal" tabindex="-1" role="dialog" aria-labelledby="xampleModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="epleModalLabel">新用户注册</h4>
                            <h4 style="color: red">{{errorInfo}}</h4>
                        </div>
                        <div class="modal-body">
                            <form autocomplete="off" @submit.prevent="onSubmit" class="zhuceForm" id="zhuceForm">
                                <div class="form-group">
                                    <label for="name" class="control-label">用户名</label>
                                    <div style="width: 240px;">
                                        <input type="text" v-model="zhucee.name" class="form-control" name="name"
                                               id="namme"
                                               placeholder="请输入用户名"
                                               required/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="pwd" class="control-label">密码</label>
                                    <div style="width: 240px;">
                                        <input type="password" v-model="zhucee.pwd1" class="form-control" name="pwd"
                                               id="pwd" placeholder="请输入密码"
                                               required/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="pwdd" class="control-label">确认密码</label>
                                    <div style="width: 240px;">
                                        <input type="password" v-model="pwd2" class="form-control" name="pwdd" id="pwdd"
                                               placeholder="请再次输入密码" required/>
                                    </div>
                                </div>
                                <!--                    <div class="form-group">-->
                                <!--                        <label for="headimg" class="control-label">头像</label>-->
                                <!--                        <div style="width: 240px;">-->
                                <!--                            <input type="file" v-model="hadeImg" class="form-control" name="headimg" id="headimg"-->
                                <!--                                   placeholder="上传图片" required/>-->
                                <!--                        </div>-->
                                <!--                    </div>-->
                                <!--                    <div class="form-group">-->
                                <!--                        <label for="birthday" class="control-label">生日</label>-->
                                <!--                        <div style="width: 240px;">-->
                                <!--                            <input type="date" v-model="birth" class="form-control" name="birthday" id="birthday"-->
                                <!--                                   placeholder="请输入生日" required/>-->
                                <!--                        </div>-->
                                <!--                    </div>-->
                                <!--                    <div class="form-group">-->
                                <!--                        <label for="email" class="control-label">邮箱</label>-->
                                <!--                        <div style="width: 240px;">-->
                                <!--                            <input type="email" v-model="emailu" class="form-control" name="email" id="email" placeholder="请输入邮箱"-->
                                <!--                                   required/>-->
                                <!--                        </div>-->
                                <!--                    </div>-->
                                <!--                    <div class="form-group">-->
                                <!--                        <label class="control-label">自我介绍</label>-->
                                <!--                        <textarea class="form-control" v-model="textinfo" name="info">这个人很懒，什么都没有说！</textarea>-->
                                <!--                    </div>-->
                            </form>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <!--因为当前button提交按钮在form标签外部，需要使用form属性对form标签进行关联-->
                            <button type="submit" form="zhuceForm" class="btn btn-primary">注册</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="looker">
            <!-- 页面内容？ -->
            <!-- 首页？ -->
            <div v-if="look==1" id="tab_1" style="width:100%;margin:0 auto">
                <div style="width: 100%;">
                    <table class="table table-hover table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>用户名</th>
                            <th>标题</th>
                            <th>热度</th>

                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="post2 in post2s" :key="post2.id" style="cursor: pointer;" @click="show(post2.id)">
                            <td v-text="post2.id"></td>
                            <td v-text="post2.username"></td>
                            <td v-text="post2.title"></td>
                            <td v-text="post2.praise"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div style="width: 100%;">
<!--                 分页-->
                    <nav aria-label="page navigation">
                        <ul class="pagination" style="margin: 0;">
                            <li @click="previousBtn" :class="pageData.page === 1?'disabled':''">
				      <span aria-label="Previous">
				        <span aria-hidden="true">&laquo;</span>
				      </span>
                            </li>
                            <li v-for="index in pageData.pageTotal"
                                :class="pageData.page === index?'active':''"
                                :key="index"
                                @click="clickPage(index)">
                                <span v-text="index"></span>
                            </li>
                            <li @click="nextBtn" :class="pageData.page === pageData.pageTotal?'disabled':''">
				      <span aria-label="Next">
				        <span aria-hidden="true">&raquo;</span>
				      </span>
                            </li>
                        </ul>
                        <label style="font-size: 25px; vertical-align: top; margin-left: 10px;">共{{pageData.pageTotal}}页
                            {{pageData.total}}条数据</label>
                    </nav>
                </div>


            </div>
            <!-- 通知 -->
            <div v-if="look==2" id="tab_2" style="width:100%;margin-left: 10%;margin-right: 10%">
                22{{look}}
            </div>
            <!-- 个人空间 -->
            <div v-if="look==3" id="tab_3" style="width:100%;margin-left: 10%;margin-right: 10%">
                33{{look}}
            </div>
            <!-- 查看帖子 -->
            <div v-if="look==4" id="tab_4" style="width:100%;margin: 0 auto">
                <div id="showPost1">
                        <div class="row" style="background-color: pink;padding: 1%;">
                            <div class="col-md-10"></div>
                            <div class="col-md-2">
                                <div class="row">
                                    <div class="col-md-4">

                                        <div id="head1"
                                             style="width: 50px; height: 50px; border-radius:25px;" v-bind:style="{backgroundImage: 'url(' + showpost.userhedimg + ')'}">
                                            <!-- <img src="img/无标题.png" style="width: 50px; height: 50px;" /> -->
                                        </div>


                                    </div>

                                    <div class="col-md-8" style="padding: 10px;">
                                        <span style="margin: 0 auto;">{{showpost.username}}</span>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 正文 -->
                        <div class="row">
                            <div class="col-md-1"></div>
                            <div class="col-md-10">
                                <h1>{{showpost.poss.title}}</h1>
                                <p>{{showpost.poss.content}}</p>
                            </div>
                            <div class="col-md-1"></div>

                        </div>
                        <div class="row">
                            <div class="col-md-10"></div>
                            <div class="col-md-1">{{showpost.pinglun}}</div>
                            <div class="col-md-1">{{showpost.poss.praise}}</div>
                        </div>
                    <div class="row">
                        <div class="col-md-2"></div>
                        <div class="col-md-8">

                            <form  autocomplete="off" @submit.prevent="showpost.commentGo">
                                <input type="text"  v-model="showpost.cct.ccomment" name="ccomment">
                                <input type="submit" value="评论">
                            </form>
                        </div>
                        <div class="col-md-2"></div>
                    </div>
                        <hr />
                        <!-- 评论 -->
                    <table v-if="showpost.commentt!=undefined" class="table table-hover table-bordered table-striped">
                        <thead>
                        <tr>
                            <th></th>
                            <th>用户名</th>
                            <th>评论</th>
                            <th>点赞</th>

                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="com in showpost.commentt" :key="com.id" style="cursor: pointer;">
                            <td></td>
                            <td v-text="com.username"></td>
                            <td v-text="com.comment"></td>
                            <td v-text="com.praise"></td>
                        </tr>
                        </tbody>
                    </table>
<!--                        <div class="row">-->
<!--                            <div class="col-md-1"></div>-->
<!--                            <div class="col-md-1">用户</div>-->
<!--                            <div class="col-md-8">内容</div>-->
<!--                            <div class="col-md-1">评论</div>-->
<!--                            <div class="col-md-1">点赞</div>-->
<!--                        </div>-->
                        <hr />

                </div>
            </div>
            </div>
        </div>
        <!-- 模态框发帖 -->
        <div v-bind:class="modalClass" v-bind:style="sty" id="postin" tabindex="-1" role="dialog"
             aria-labelledby="exampleModalLabel">
            <div class="modal-dialog" role="document">

                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="exampleModaabel">发帖</h4>
                    </div>
                    <div class="modal-body">
                        <form autocomplete="off" @submit.prevent="postGo" class="zhuceForm" id="faForm" method="post">
                            <div class="form-group">
                                <label for="name" class="control-label">标题</label>
                                <div style="width: 240px;">
                                    <input v-model="posts.postTitle" type="text" class="form-control" name="name"
                                           id="naame" placeholder="请输入标签"
                                           required/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="name" class="control-label">标签</label>
                                <div style="width: 240px;">
                                    <input v-model="posts.tabel" type="text" class="form-control" name="name" id="name2"
                                           placeholder="请输入标签"/>
                                </div>
                            </div>
                            <!--                    <div class="form-group">-->
                            <!--                        <label for="name" class="control-label">标签3</label>-->
                            <!--                        <div style="width: 240px;">-->
                            <!--                            <input type="text" class="form-control" name="name" id="name3"-->
                            <!--                                   placeholder="请输入标签"/>-->
                            <!--                        </div>-->
                            <!--                    </div>-->
                            <!--                    <div class="form-group">-->
                            <!--                        <label for="name" class="control-label">标签4</label>-->
                            <!--                        <div style="width: 240px;">-->
                            <!--                            <input type="text" class="form-control" name="name" id="name4"-->
                            <!--                                   placeholder="请输入标签"/>-->
                            <!--                        </div>-->
                            <!--                    </div>-->
                            <div class="form-group">
                                <label class="control-label">内容</label>
                                <textarea v-model="posts.content" class="form-control" name="info">什么都没有</textarea>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <!--因为当前button提交按钮在form标签外部，需要使用form属性对form标签进行关联-->
                        <button type="submit" form="faForm" class="btn btn-primary">确认</button>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!-- 模态框评论 -->
    <div class="modal fade" id="comModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
        <div class="modal-dialog" role="document">

            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="exampleMolLabel">回复</h4>
                </div>
                <form action="" class="updForm" id="piForm">
                    <div class="form-group">
                        <label class="control-label">内容</label>
                        <textarea class="form-control" name="info">嘿嘿</textarea>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <!--因为当前button提交按钮在form标签外部，需要使用form属性对form标签进行关联-->
                <button type="submit" form="piForm" class="btn btn-primary">确认</button>
            </div>
        </div>

    </div>
</div>
</div>
<!-- 模态框修改标签 -->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="exampleModalLabel">请输入要修改的标签</h4>
            </div>
            <div class="modal-body">
                <form action="" class="updForm" id="updForm">
                    <div class="form-group">
                        <label for="name" class="control-label">输入标签</label>
                        <div style="width: 240px;">
                            <input type="text" class="form-control" name="name" id="name" placeholder="请输入标签"
                                   required/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label">添加</label>
                        <div style="width: 240px;">
                            <input type="radio" class="form-control" name="up" id="daa" value="add" required/>
                            <label class="control-label">删除</label>
                            <input type="radio" class="form-control" name="up" id="da" value="dele"/>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <!--因为当前button提交按钮在form标签外部，需要使用form属性对form标签进行关联-->
                <button type="submit" form="updForm" class="btn btn-primary">修改</button>
            </div>
        </div>
    </div>
</div>
<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="./js/jquery.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="./js/bootstrap.min.js"></script>
<!-- 加载vue文件 -->
<script src="./js/axios.min.js" type="text/javascript"></script>
<script>

    // vue代码*************************************************************
    var zhuye = new Vue({
        el: "#looker",
        data: {
            look: null,
            post2s: [],
            pageData: {
                page: 1, // 当前页
                limit: 5, // 每页显示的行数
                total: 0, // 总的数据条数
                pageTotal: 0  // 总的页数
            },
            pos:{},

        },
        methods: {
            too() {
                one.look=this.look;
                zhuye.indexPost();
            },
            show(id) {
                this.look=4;
                this.too();
                //通过id查询post帖子
                this.post2s.findIndex(item => {
                    if (item.id===id){
                        this.pos=item;
                        console.log(item.id+"ddddddddddddd");
                    }

                });

                if (this.pos!=null){
                    showpost.poss=this.pos;
                    showpost.to();

                }

            },
            indexPost() {

                    //查询post列表
                    axios.post("./post/look.action", // 设置参数
                        {
                            params: {
                                page: this.pageData.page,
                                limit: this.pageData.limit,
                            }
                        }).then(res => {
                        if (res.data.type == 0) {
                            console.log(res.data);
                            // 将请求到的商品列表数据赋值给数据模型
                            this.post2s = res.data.data;
                            // 赋值分页相关数据
                            this.pageData.total = res.data.total;
                            this.pageData.pageTotal = res.data.pageTotal;
                        }
                    })



            },
            // 上一页
            previousBtn() {
                if (this.pageData.page > 1) {
                    this.pageData.page--;
                    this.initGoodsData();
                }
            },
            nextBtn() {
                if (this.pageData.page < this.pageData.pageTotal) {
                    this.pageData.page++;
                    this.initGoodsData();
                }
            },
            // 分页按钮的点击事件
            clickPage(currentPage) {
                // 设置当前的分页数
                this.pageData.page = currentPage;
                // 修改分页数据后 执行查询数据
                this.initGoodsData();
            },
        },
        created() {
            this.indexPost();
        },
    });

    var one = new Vue({
        el: "#app",
        data: {


            // 判断用户是否登录
            hed1type: false,
            hedimg: "",
            hedname: "",
            seek:"",
            zhucee: {
                name: "",
                pwd1: "",
                seekp:"",
            },
            look: 1,
            pwd2: "",
            // 注册的头像
            // hadeImg:[],
            // birth:Date(),
            emailu: "",
            textinfo: "",
            loginData: {
                user: {},
                userdata: {},
            },

            errorInfo: ""
        },
        methods: {
            seekSubmit(){
                this.zhucee.seekp=this.seek;
                axios.post("./post/cha.action", this.zhucee).then(res => {
                    if (res.data.type == 0) {
                        zhuye.post2s=res.data.data;

                    }
                })
            },
            //更新look到zhuye
            to() {
                zhuye.look = this.look;
            },
            // 获取user对象存到this.user
            getUserInfo() {
                axios.post("./user/who.action").then(response => {
                    console.log(response.data);
                    this.user = response.data;

                    this.index();
                });

            },
            index() {
                // 判断用户是否为空、
                if (this.user != null && this.user != "") {
                    this.hed1type = true;
                    this.hedname = this.user.username;
                    axios.post("./user/whodata.action").then(response => {
                        console.log(response.data);
                        this.userdata = response.data;
                        this.hedimg = this.userdata.img;
                    });
                    return this.user.id;
                }
                return false;
            },
            onSubmit() {
                console.log(this.zhucee);
                if (this.pwd2 != this.zhucee.pwd1) {
                    return this.errorInfo = "两次密码不一致！";
                } else {
                    axios.post("./user/zhuce.action", this.zhucee).then(res => {
                        if (res.data.type === 0) {
                            // 跳转页面到登录页
                            this.errorInfo = "注册成功！"
                            setTimeout(function () {

                                window.location.href = "door.html";
                            }, 1000);

                        } else {
                            this.errorInfo = res.data.message;
                        }
                    })
                }
            },
            // 退出登录
            exit() {
                axios.post("./user/logout.action").then(res => {
                    if (res.data.type === 0) {
                        // 跳转页面到登录页
                        window.location.href = "door.html";
                    }
                })
            }
        },
        created() {
            // 网页加载时，自动执行用户信息加载
            this.getUserInfo();
                this.to();
                console.log(this.user);
            console.log(this.userdata);

        }


    });



//发帖
    var post1 = new Vue({
        el: "#postin",
        data: {
            modalClass: "modal fade",
            sty: "display: none;",
            posts: {
                postTitle: "",
                tabel: "",
                userid: undefined,
                content: "",
            },


        },
        methods: {

            //提交帖子
            postGo() {
                this.addUserid();
                axios.post("./post/create.action", this.posts).then(res => {
                    if (res.data.type == 0) {
                        alert("发帖成功！");
                        this.modalClass = "modal fade";
                        this.sty = "display: none;";
                        window.location.href = "door2.html";
                    }
                })
            },
            //userid赋值
            addUserid() {
                this.posts.userid = one.user.id;

            },
        },
        created() {

        },
    });

    var showpost=new Vue({
        el:"#tab_4",
        data:{
            poss:{},
            userhedimg:"",
            username:"",
            pinglun:"",
            commentt:[],
            cct:{
                ccomment:"",
                userid:"",
                postid:"",
            },
        },
        methods:{
                to(){
                    //更新评论
                    console.log("服务器接受"+this.poss.id);
                    axios.post("./comment/find.action", this.poss).then(res => {
                        if (res.data.type == 0) {
                           this.commentt=res.data.data
                        }
                    })
                },
            commentGo(){
                    //查看用户是否登录
                if(one.user==null||one.user==""){
                    alert("请登录！");

                }else {
                    this.cct.postid=this.poss.id;
                    this.cct.userid=one.index();
                    console.log(this.cct)

                    axios.post("./comment/add.action", this.cct).then(res => {
                        if (res.data.type == 0) {
                           this.to();
                        }
                    })
                }
            }
        },
        created(){

        }
    });


</script>

</body>
</html>
